import 'package:flutter/material.dart';
import 'package:wayofdressing/components/buttoncontent.dart';
import 'package:wayofdressing/contraints.dart';

class bigButton extends StatelessWidget {
  bigButton({
    required this.text,
    this.flexNumber = 1,
    required this.onPressed,
    required this.buttonIcon,
  });

  final String text;
  final int flexNumber;
  final void Function() onPressed;
  final Icon buttonIcon;

  @override
  Widget build(BuildContext context) {
    return Expanded(
      flex: flexNumber,
      child: GestureDetector(
        onTap: onPressed,
        child: Container(
          margin: EdgeInsets.all(10),
          padding: EdgeInsets.symmetric(horizontal: 10.0,vertical: 5.0),
          decoration:  BoxDecoration(
              boxShadow: [
                BoxShadow(
                  color: Colors.black.withOpacity(0.2), // 阴影颜色和透明度
                  spreadRadius: 2, // 阴影扩展半径
                  blurRadius: 5, // 阴影模糊半径
                  offset: Offset(0, 3), // 阴影偏移量
                ),
              ],
              color: Colors.white,
              borderRadius: BorderRadius.circular(25)),
          child: buttonContent(
            icon: buttonIcon,
            textContent: text,
            textStyle: TextStyle(
              color: Colors.black,
              fontWeight: FontWeight.bold,
              fontSize: kBigButtonFontSize,
            ),
          ),
        ),
      ),
    );
  }
}
